import Vue from "vue";
import {
  Button,
  Layout,
  Icon,
  Drawer,
  Radio,
  Menu,
  Form,
  Input,
  Select,
  // LocaleProvider,
  ConfigProvider,
  Dropdown,
  DatePicker
} from "ant-design-vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
// import 'ant-design-vue/dist/antd.less'
import Authorized from "./components/Authorized.vue";
import Auth from "./directives/auth";
import VueHighlightJS from "vue-highlightjs"
import "highlight.js/styles/github.css";


Vue.config.productionTip = false;
Vue.use(Button); //按钮
Vue.use(Layout); //布局
Vue.use(Icon); //图标
Vue.use(Drawer); //抽屉
Vue.use(Radio); //单选
Vue.use(Menu); //菜单
Vue.use(Form); //表单
Vue.use(Input); //输入框
Vue.use(Select); //选择器
// Vue.use(LocaleProvider);//国际化 已废弃
Vue.use(ConfigProvider); //国际化
Vue.use(Dropdown); //下拉菜单
Vue.use(DatePicker); //日历

Vue.use(VueHighlightJS);


//权限控制
Vue.component('Authorized', Authorized)


const IconFont = Icon.createFromIconfontCN({
  scriptUrl: "//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js" // 在 iconfont.cn 上生成
});
Vue.component('IconFont', IconFont)

Vue.use(Auth, {
  name: 'auth'
});

// Vue.use(Decorator, {
//   name: 'decorator'
// });

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");